package educationaladministrationsystem.CSM.Mapper.StudentAndTeacher.Student;

import educationaladministrationsystem.Class.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentCourseSelectionMapper {
    @Select("select * from course where id in (select classId from studentwithcourse where studentId=#{id}) limit #{page},#{pageNumber}")
    List<Course> getAllCourse(String id, int page, int pageNumber);

    @Select("select count(*) from studentwithcourse where studentId=#{id}")
    int getCourseCount(String id);
}
